package com.qijia.travel.domain.example;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.qijia.travel.common.Constants;
import com.qijia.travel.helper.DateHelper;
import com.qijia.travel.vo.TouristDetailVo;

public class TouristWorkDetailExample extends BaseExample {
	protected String orderByClause;
	protected List<Criteria> oredCriteria;

	public TouristWorkDetailExample() {
		oredCriteria = new ArrayList<Criteria>();
	}

	protected TouristWorkDetailExample(TouristWorkDetailExample example) {
		this.orderByClause = example.orderByClause;
		this.oredCriteria = example.oredCriteria;
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	public Criteria createCriteria(TouristDetailVo vo) {
		Criteria criteria = createCriteriaInternal(vo);
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	protected Criteria createCriteriaInternal(TouristDetailVo vo) {
		Criteria criteria = new Criteria(vo);
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
	}

	public static class Criteria {
		protected List<String> criteriaWithoutValue;
		protected List<Map<String, Object>> criteriaWithSingleValue;
		protected List<Map<String, Object>> criteriaWithListValue;
		protected List<Map<String, Object>> criteriaWithBetweenValue;

		protected Criteria() {
			super();
			criteriaWithoutValue = new ArrayList<String>();
			criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
			criteriaWithListValue = new ArrayList<Map<String, Object>>();
			criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
		}

		protected Criteria(TouristDetailVo vo) {
			super();
			criteriaWithoutValue = new ArrayList<String>();
			criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
			criteriaWithListValue = new ArrayList<Map<String, Object>>();
			criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();

			if (vo != null) {
				if (vo.getSearchCode() != null && vo.getSearchKeyword() != null
						&& vo.getSearchKeyword().length() > 0) {
					vo.setSearchKeyword(vo.getSearchKeyword().trim());
					switch (vo.getSearchCode()) {
					case Constants.SEARCH_GUIDE_ID_CODE: {
						try {
							this.andTgdGuideIdEqualTo(Integer.parseInt(vo
									.getSearchKeyword()));
						} catch (NumberFormatException e) {

						}
					}
						;
						break;
					case Constants.SEARCH_GUIDE_NAME_CODE: {
						this.andTgdGuideNameLike("%" + vo.getSearchKeyword()
								+ "%");
					}
						;
						break;
					case Constants.SEARCH_GROUP_NAME_CODE: {
						this.andAgencyMissionNameLike("%"
								+ vo.getSearchKeyword() + "%");
					}
						;
						break;

					case Constants.SEARCH_GROUP_SOFT_ID_CODE: {
						try {
							this.andTouristGroupIdEqualTo(Integer.parseInt(vo
									.getSearchKeyword()));
						} catch (NumberFormatException e) {

						}
					}
						;
						break;
					case Constants.SEARCH_GROUP_ID_CODE: {
						this.andTgdTouristGroupSnLike("%"
								+ vo.getSearchKeyword() + "%");
					}
						;
						break;
					case Constants.SEARCH_TREAM_NAME_CODE: {
						this
								.andTreamNameLike("%" + vo.getSearchKeyword()
										+ "%");
					}
						;
						break;

					case Constants.SEARCH_GUIDE_TYPE_CODE: {
						try {
							this.andGuideTypeEqualTo(Integer.parseInt(vo
									.getSearchKeyword()));
						} catch (NumberFormatException e) {

						}
					}
						;
						break;
					default:
						break;
					}
				}

				if (vo.getDateCode() != null
						&& (vo.getStDate() != null && vo.getStDate().length() > 0)) {
					Calendar startDate = Calendar.getInstance();
					Calendar endDate = Calendar.getInstance();

					try {
						startDate.setTime(DateHelper.parseToDate(
								vo.getStDate(), DateHelper.yyyyMMdd));
						if (vo.getEdDate() != null
								&& vo.getEdDate().length() > 0) {
							endDate.setTime(DateHelper.parseToDate(vo
									.getEdDate(), DateHelper.yyyyMMdd));
						}

						switch (vo.getDateCode()) {
						case Constants.DATETYPE_GROUP_START_DATE_CODE: {
							this.andTgdStartDtGreaterThanOrEqualTo(startDate
									.getTime());
							this.andTgdStartDtLessThanOrEqualTo(endDate
									.getTime());
						}
							;
							break;
						case Constants.DATETYPE_GROUP_END_DATE_CODE: {
							this.andTgdStartDtGreaterThanOrEqualTo(startDate
									.getTime());
							this.andTgdStartDtLessThanOrEqualTo(endDate
									.getTime());
						}
							break;
						default:
							break;
						}
					} catch (Exception e) {
					}

				}

				if (vo.getTreamId() != null && vo.getTreamId() != 0) {
					this.andTreamIdEqualTo(vo.getTreamId());
				}
			}
		}

		public boolean isValid() {
			return criteriaWithoutValue.size() > 0
					|| criteriaWithSingleValue.size() > 0
					|| criteriaWithListValue.size() > 0
					|| criteriaWithBetweenValue.size() > 0;
		}

		public List<String> getCriteriaWithoutValue() {
			return criteriaWithoutValue;
		}

		public List<Map<String, Object>> getCriteriaWithSingleValue() {
			return criteriaWithSingleValue;
		}

		public List<Map<String, Object>> getCriteriaWithListValue() {
			return criteriaWithListValue;
		}

		public List<Map<String, Object>> getCriteriaWithBetweenValue() {
			return criteriaWithBetweenValue;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteriaWithoutValue.add(condition);
		}

		protected void addCriterion(String condition, Object value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("value", value);
			criteriaWithSingleValue.add(map);
		}

		protected void addCriterion(String condition,
				List<? extends Object> values, String property) {
			if (values == null || values.size() == 0) {
				throw new RuntimeException("Value list for " + property
						+ " cannot be null or empty");
			}
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("values", values);
			criteriaWithListValue.add(map);
		}

		protected void addCriterion(String condition, Object value1,
				Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			List<Object> list = new ArrayList<Object>();
			list.add(value1);
			list.add(value2);
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("values", list);
			criteriaWithBetweenValue.add(map);
		}

		public Criteria andAgencyMissionSnIsNull() {
			addCriterion("agency_mission_sn is null");
			return this;
		}

		public Criteria andAgencyMissionSnIsNotNull() {
			addCriterion("agency_mission_sn is not null");
			return this;
		}

		public Criteria andAgencyMissionSnEqualTo(String value) {
			addCriterion("agency_mission_sn =", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotEqualTo(String value) {
			addCriterion("agency_mission_sn <>", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnGreaterThan(String value) {
			addCriterion("agency_mission_sn >", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnGreaterThanOrEqualTo(String value) {
			addCriterion("agency_mission_sn >=", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLessThan(String value) {
			addCriterion("agency_mission_sn <", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLessThanOrEqualTo(String value) {
			addCriterion("agency_mission_sn <=", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLike(String value) {
			addCriterion("agency_mission_sn like", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotLike(String value) {
			addCriterion("agency_mission_sn not like", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnIn(List<String> values) {
			addCriterion("agency_mission_sn in", values, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotIn(List<String> values) {
			addCriterion("agency_mission_sn not in", values, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnBetween(String value1, String value2) {
			addCriterion("agency_mission_sn between", value1, value2,
					"agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotBetween(String value1,
				String value2) {
			addCriterion("agency_mission_sn not between", value1, value2,
					"agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionNameIsNull() {
			addCriterion("agency_mission_name is null");
			return this;
		}

		public Criteria andAgencyMissionNameIsNotNull() {
			addCriterion("agency_mission_name is not null");
			return this;
		}

		public Criteria andAgencyMissionNameEqualTo(String value) {
			addCriterion("agency_mission_name =", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotEqualTo(String value) {
			addCriterion("agency_mission_name <>", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameGreaterThan(String value) {
			addCriterion("agency_mission_name >", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameGreaterThanOrEqualTo(String value) {
			addCriterion("agency_mission_name >=", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLessThan(String value) {
			addCriterion("agency_mission_name <", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLessThanOrEqualTo(String value) {
			addCriterion("agency_mission_name <=", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLike(String value) {
			addCriterion("agency_mission_name like", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotLike(String value) {
			addCriterion("agency_mission_name not like", value,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameIn(List<String> values) {
			addCriterion("agency_mission_name in", values, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotIn(List<String> values) {
			addCriterion("agency_mission_name not in", values,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameBetween(String value1, String value2) {
			addCriterion("agency_mission_name between", value1, value2,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotBetween(String value1,
				String value2) {
			addCriterion("agency_mission_name not between", value1, value2,
					"agencyMissionName");
			return this;
		}

		public Criteria andTouristGroupDetailIdIsNull() {
			addCriterion("tourist_group_detail_id is null");
			return this;
		}

		public Criteria andTouristGroupDetailIdIsNotNull() {
			addCriterion("tourist_group_detail_id is not null");
			return this;
		}

		public Criteria andTouristGroupDetailIdEqualTo(Integer value) {
			addCriterion("tourist_group_detail_id =", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdNotEqualTo(Integer value) {
			addCriterion("tourist_group_detail_id <>", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdGreaterThan(Integer value) {
			addCriterion("tourist_group_detail_id >", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdGreaterThanOrEqualTo(
				Integer value) {
			addCriterion("tourist_group_detail_id >=", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdLessThan(Integer value) {
			addCriterion("tourist_group_detail_id <", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdLessThanOrEqualTo(Integer value) {
			addCriterion("tourist_group_detail_id <=", value,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdIn(List<Integer> values) {
			addCriterion("tourist_group_detail_id in", values,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdNotIn(List<Integer> values) {
			addCriterion("tourist_group_detail_id not in", values,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_detail_id between", value1, value2,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTouristGroupDetailIdNotBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_detail_id not between", value1, value2,
					"touristGroupDetailId");
			return this;
		}

		public Criteria andTgdTouristGroupSnIsNull() {
			addCriterion("tgd_tourist_group_sn is null");
			return this;
		}

		public Criteria andTgdTouristGroupSnIsNotNull() {
			addCriterion("tgd_tourist_group_sn is not null");
			return this;
		}

		public Criteria andTgdTouristGroupSnEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn =", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnNotEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn <>", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnGreaterThan(String value) {
			addCriterion("tgd_tourist_group_sn >", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnGreaterThanOrEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn >=", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnLessThan(String value) {
			addCriterion("tgd_tourist_group_sn <", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnLessThanOrEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn <=", value, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnLike(String value) {
			addCriterion("tgd_tourist_group_sn like", value,
					"tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnNotLike(String value) {
			addCriterion("tgd_tourist_group_sn not like", value,
					"tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnIn(List<String> values) {
			addCriterion("tgd_tourist_group_sn in", values, "tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnNotIn(List<String> values) {
			addCriterion("tgd_tourist_group_sn not in", values,
					"tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnBetween(String value1, String value2) {
			addCriterion("tgd_tourist_group_sn between", value1, value2,
					"tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdTouristGroupSnNotBetween(String value1,
				String value2) {
			addCriterion("tgd_tourist_group_sn not between", value1, value2,
					"tgdTouristGroupSn");
			return this;
		}

		public Criteria andTgdGuideIdIsNull() {
			addCriterion("tgd_guide_id is null");
			return this;
		}

		public Criteria andTgdGuideIdIsNotNull() {
			addCriterion("tgd_guide_id is not null");
			return this;
		}

		public Criteria andTgdGuideIdEqualTo(Integer value) {
			addCriterion("tgd_guide_id =", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdNotEqualTo(Integer value) {
			addCriterion("tgd_guide_id <>", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdGreaterThan(Integer value) {
			addCriterion("tgd_guide_id >", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("tgd_guide_id >=", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdLessThan(Integer value) {
			addCriterion("tgd_guide_id <", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdLessThanOrEqualTo(Integer value) {
			addCriterion("tgd_guide_id <=", value, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdIn(List<Integer> values) {
			addCriterion("tgd_guide_id in", values, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdNotIn(List<Integer> values) {
			addCriterion("tgd_guide_id not in", values, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdBetween(Integer value1, Integer value2) {
			addCriterion("tgd_guide_id between", value1, value2, "tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideIdNotBetween(Integer value1, Integer value2) {
			addCriterion("tgd_guide_id not between", value1, value2,
					"tgdGuideId");
			return this;
		}

		public Criteria andTgdGuideNameIsNull() {
			addCriterion("tgd_guide_name is null");
			return this;
		}

		public Criteria andTgdGuideNameIsNotNull() {
			addCriterion("tgd_guide_name is not null");
			return this;
		}

		public Criteria andTgdGuideNameEqualTo(String value) {
			addCriterion("tgd_guide_name =", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameNotEqualTo(String value) {
			addCriterion("tgd_guide_name <>", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameGreaterThan(String value) {
			addCriterion("tgd_guide_name >", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameGreaterThanOrEqualTo(String value) {
			addCriterion("tgd_guide_name >=", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameLessThan(String value) {
			addCriterion("tgd_guide_name <", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameLessThanOrEqualTo(String value) {
			addCriterion("tgd_guide_name <=", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameLike(String value) {
			addCriterion("tgd_guide_name like", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameNotLike(String value) {
			addCriterion("tgd_guide_name not like", value, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameIn(List<String> values) {
			addCriterion("tgd_guide_name in", values, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameNotIn(List<String> values) {
			addCriterion("tgd_guide_name not in", values, "tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameBetween(String value1, String value2) {
			addCriterion("tgd_guide_name between", value1, value2,
					"tgdGuideName");
			return this;
		}

		public Criteria andTgdGuideNameNotBetween(String value1, String value2) {
			addCriterion("tgd_guide_name not between", value1, value2,
					"tgdGuideName");
			return this;
		}

		public Criteria andTgdStartDtIsNull() {
			addCriterion("tgd_start_dt is null");
			return this;
		}

		public Criteria andTgdStartDtIsNotNull() {
			addCriterion("tgd_start_dt is not null");
			return this;
		}

		public Criteria andTgdStartDtEqualTo(Date value) {
			addCriterion("tgd_start_dt =", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtNotEqualTo(Date value) {
			addCriterion("tgd_start_dt <>", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtGreaterThan(Date value) {
			addCriterion("tgd_start_dt >", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtGreaterThanOrEqualTo(Date value) {
			addCriterion("tgd_start_dt >=", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtLessThan(Date value) {
			addCriterion("tgd_start_dt <", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtLessThanOrEqualTo(Date value) {
			addCriterion("tgd_start_dt <=", value, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtIn(List<Date> values) {
			addCriterion("tgd_start_dt in", values, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtNotIn(List<Date> values) {
			addCriterion("tgd_start_dt not in", values, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtBetween(Date value1, Date value2) {
			addCriterion("tgd_start_dt between", value1, value2, "tgdStartDt");
			return this;
		}

		public Criteria andTgdStartDtNotBetween(Date value1, Date value2) {
			addCriterion("tgd_start_dt not between", value1, value2,
					"tgdStartDt");
			return this;
		}

		public Criteria andTgdContinuedDateIsNull() {
			addCriterion("tgd_continued_date is null");
			return this;
		}

		public Criteria andTgdContinuedDateIsNotNull() {
			addCriterion("tgd_continued_date is not null");
			return this;
		}

		public Criteria andTgdContinuedDateEqualTo(Float value) {
			addCriterion("tgd_continued_date =", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateNotEqualTo(Float value) {
			addCriterion("tgd_continued_date <>", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateGreaterThan(Float value) {
			addCriterion("tgd_continued_date >", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateGreaterThanOrEqualTo(Float value) {
			addCriterion("tgd_continued_date >=", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateLessThan(Float value) {
			addCriterion("tgd_continued_date <", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateLessThanOrEqualTo(Float value) {
			addCriterion("tgd_continued_date <=", value, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateIn(List<Float> values) {
			addCriterion("tgd_continued_date in", values, "tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateNotIn(List<Float> values) {
			addCriterion("tgd_continued_date not in", values,
					"tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateBetween(Float value1, Float value2) {
			addCriterion("tgd_continued_date between", value1, value2,
					"tgdContinuedDate");
			return this;
		}

		public Criteria andTgdContinuedDateNotBetween(Float value1, Float value2) {
			addCriterion("tgd_continued_date not between", value1, value2,
					"tgdContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateIsNull() {
			addCriterion("tgd_actual_continued_date is null");
			return this;
		}

		public Criteria andTgdActualContinuedDateIsNotNull() {
			addCriterion("tgd_actual_continued_date is not null");
			return this;
		}

		public Criteria andTgdActualContinuedDateEqualTo(Float value) {
			addCriterion("tgd_actual_continued_date =", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateNotEqualTo(Float value) {
			addCriterion("tgd_actual_continued_date <>", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateGreaterThan(Float value) {
			addCriterion("tgd_actual_continued_date >", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateGreaterThanOrEqualTo(
				Float value) {
			addCriterion("tgd_actual_continued_date >=", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateLessThan(Float value) {
			addCriterion("tgd_actual_continued_date <", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateLessThanOrEqualTo(Float value) {
			addCriterion("tgd_actual_continued_date <=", value,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateIn(List<Float> values) {
			addCriterion("tgd_actual_continued_date in", values,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateNotIn(List<Float> values) {
			addCriterion("tgd_actual_continued_date not in", values,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateBetween(Float value1,
				Float value2) {
			addCriterion("tgd_actual_continued_date between", value1, value2,
					"tgdActualContinuedDate");
			return this;
		}

		public Criteria andTgdActualContinuedDateNotBetween(Float value1,
				Float value2) {
			addCriterion("tgd_actual_continued_date not between", value1,
					value2, "tgdActualContinuedDate");
			return this;
		}

		public Criteria andTouristGroupIdIsNull() {
			addCriterion("tourist_group_id is null");
			return this;
		}

		public Criteria andTouristGroupIdIsNotNull() {
			addCriterion("tourist_group_id is not null");
			return this;
		}

		public Criteria andTouristGroupIdEqualTo(Integer value) {
			addCriterion("tourist_group_id =", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdNotEqualTo(Integer value) {
			addCriterion("tourist_group_id <>", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdGreaterThan(Integer value) {
			addCriterion("tourist_group_id >", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("tourist_group_id >=", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdLessThan(Integer value) {
			addCriterion("tourist_group_id <", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdLessThanOrEqualTo(Integer value) {
			addCriterion("tourist_group_id <=", value, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdIn(List<Integer> values) {
			addCriterion("tourist_group_id in", values, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdNotIn(List<Integer> values) {
			addCriterion("tourist_group_id not in", values, "touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdBetween(Integer value1, Integer value2) {
			addCriterion("tourist_group_id between", value1, value2,
					"touristGroupId");
			return this;
		}

		public Criteria andTouristGroupIdNotBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_id not between", value1, value2,
					"touristGroupId");
			return this;
		}

		public Criteria andTouristGroupTypeIsNull() {
			addCriterion("tourist_group_type is null");
			return this;
		}

		public Criteria andTouristGroupTypeIsNotNull() {
			addCriterion("tourist_group_type is not null");
			return this;
		}

		public Criteria andTouristGroupTypeEqualTo(String value) {
			addCriterion("tourist_group_type =", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeNotEqualTo(String value) {
			addCriterion("tourist_group_type <>", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeGreaterThan(String value) {
			addCriterion("tourist_group_type >", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeGreaterThanOrEqualTo(String value) {
			addCriterion("tourist_group_type >=", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeLessThan(String value) {
			addCriterion("tourist_group_type <", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeLessThanOrEqualTo(String value) {
			addCriterion("tourist_group_type <=", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeLike(String value) {
			addCriterion("tourist_group_type like", value, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeNotLike(String value) {
			addCriterion("tourist_group_type not like", value,
					"touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeIn(List<String> values) {
			addCriterion("tourist_group_type in", values, "touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeNotIn(List<String> values) {
			addCriterion("tourist_group_type not in", values,
					"touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeBetween(String value1, String value2) {
			addCriterion("tourist_group_type between", value1, value2,
					"touristGroupType");
			return this;
		}

		public Criteria andTouristGroupTypeNotBetween(String value1,
				String value2) {
			addCriterion("tourist_group_type not between", value1, value2,
					"touristGroupType");
			return this;
		}

		public Criteria andCustomerSourseIsNull() {
			addCriterion("customer_sourse is null");
			return this;
		}

		public Criteria andCustomerSourseIsNotNull() {
			addCriterion("customer_sourse is not null");
			return this;
		}

		public Criteria andCustomerSourseEqualTo(String value) {
			addCriterion("customer_sourse =", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseNotEqualTo(String value) {
			addCriterion("customer_sourse <>", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseGreaterThan(String value) {
			addCriterion("customer_sourse >", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseGreaterThanOrEqualTo(String value) {
			addCriterion("customer_sourse >=", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseLessThan(String value) {
			addCriterion("customer_sourse <", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseLessThanOrEqualTo(String value) {
			addCriterion("customer_sourse <=", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseLike(String value) {
			addCriterion("customer_sourse like", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseNotLike(String value) {
			addCriterion("customer_sourse not like", value, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseIn(List<String> values) {
			addCriterion("customer_sourse in", values, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseNotIn(List<String> values) {
			addCriterion("customer_sourse not in", values, "customerSourse");
			return this;
		}

		public Criteria andCustomerSourseBetween(String value1, String value2) {
			addCriterion("customer_sourse between", value1, value2,
					"customerSourse");
			return this;
		}

		public Criteria andCustomerSourseNotBetween(String value1, String value2) {
			addCriterion("customer_sourse not between", value1, value2,
					"customerSourse");
			return this;
		}

		public Criteria andCustomerNumIsNull() {
			addCriterion("customer_num is null");
			return this;
		}

		public Criteria andCustomerNumIsNotNull() {
			addCriterion("customer_num is not null");
			return this;
		}

		public Criteria andCustomerNumEqualTo(Integer value) {
			addCriterion("customer_num =", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumNotEqualTo(Integer value) {
			addCriterion("customer_num <>", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumGreaterThan(Integer value) {
			addCriterion("customer_num >", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumGreaterThanOrEqualTo(Integer value) {
			addCriterion("customer_num >=", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumLessThan(Integer value) {
			addCriterion("customer_num <", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumLessThanOrEqualTo(Integer value) {
			addCriterion("customer_num <=", value, "customerNum");
			return this;
		}

		public Criteria andCustomerNumIn(List<Integer> values) {
			addCriterion("customer_num in", values, "customerNum");
			return this;
		}

		public Criteria andCustomerNumNotIn(List<Integer> values) {
			addCriterion("customer_num not in", values, "customerNum");
			return this;
		}

		public Criteria andCustomerNumBetween(Integer value1, Integer value2) {
			addCriterion("customer_num between", value1, value2, "customerNum");
			return this;
		}

		public Criteria andCustomerNumNotBetween(Integer value1, Integer value2) {
			addCriterion("customer_num not between", value1, value2,
					"customerNum");
			return this;
		}

		public Criteria andTouristFileIsNull() {
			addCriterion("tourist_file is null");
			return this;
		}

		public Criteria andTouristFileIsNotNull() {
			addCriterion("tourist_file is not null");
			return this;
		}

		public Criteria andTouristFileEqualTo(String value) {
			addCriterion("tourist_file =", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileNotEqualTo(String value) {
			addCriterion("tourist_file <>", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileGreaterThan(String value) {
			addCriterion("tourist_file >", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileGreaterThanOrEqualTo(String value) {
			addCriterion("tourist_file >=", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileLessThan(String value) {
			addCriterion("tourist_file <", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileLessThanOrEqualTo(String value) {
			addCriterion("tourist_file <=", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileLike(String value) {
			addCriterion("tourist_file like", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileNotLike(String value) {
			addCriterion("tourist_file not like", value, "touristFile");
			return this;
		}

		public Criteria andTouristFileIn(List<String> values) {
			addCriterion("tourist_file in", values, "touristFile");
			return this;
		}

		public Criteria andTouristFileNotIn(List<String> values) {
			addCriterion("tourist_file not in", values, "touristFile");
			return this;
		}

		public Criteria andTouristFileBetween(String value1, String value2) {
			addCriterion("tourist_file between", value1, value2, "touristFile");
			return this;
		}

		public Criteria andTouristFileNotBetween(String value1, String value2) {
			addCriterion("tourist_file not between", value1, value2,
					"touristFile");
			return this;
		}

		public Criteria andTreamIdIsNull() {
			addCriterion("tream_id is null");
			return this;
		}

		public Criteria andTreamIdIsNotNull() {
			addCriterion("tream_id is not null");
			return this;
		}

		public Criteria andTreamIdEqualTo(Integer value) {
			addCriterion("tream_id =", value, "treamId");
			return this;
		}

		public Criteria andTreamIdNotEqualTo(Integer value) {
			addCriterion("tream_id <>", value, "treamId");
			return this;
		}

		public Criteria andTreamIdGreaterThan(Integer value) {
			addCriterion("tream_id >", value, "treamId");
			return this;
		}

		public Criteria andTreamIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("tream_id >=", value, "treamId");
			return this;
		}

		public Criteria andTreamIdLessThan(Integer value) {
			addCriterion("tream_id <", value, "treamId");
			return this;
		}

		public Criteria andTreamIdLessThanOrEqualTo(Integer value) {
			addCriterion("tream_id <=", value, "treamId");
			return this;
		}

		public Criteria andTreamIdIn(List<Integer> values) {
			addCriterion("tream_id in", values, "treamId");
			return this;
		}

		public Criteria andTreamIdNotIn(List<Integer> values) {
			addCriterion("tream_id not in", values, "treamId");
			return this;
		}

		public Criteria andTreamIdBetween(Integer value1, Integer value2) {
			addCriterion("tream_id between", value1, value2, "treamId");
			return this;
		}

		public Criteria andTreamIdNotBetween(Integer value1, Integer value2) {
			addCriterion("tream_id not between", value1, value2, "treamId");
			return this;
		}

		public Criteria andTreamNameIsNull() {
			addCriterion("tream_name is null");
			return this;
		}

		public Criteria andTreamNameIsNotNull() {
			addCriterion("tream_name is not null");
			return this;
		}

		public Criteria andTreamNameEqualTo(String value) {
			addCriterion("tream_name =", value, "treamName");
			return this;
		}

		public Criteria andTreamNameNotEqualTo(String value) {
			addCriterion("tream_name <>", value, "treamName");
			return this;
		}

		public Criteria andTreamNameGreaterThan(String value) {
			addCriterion("tream_name >", value, "treamName");
			return this;
		}

		public Criteria andTreamNameGreaterThanOrEqualTo(String value) {
			addCriterion("tream_name >=", value, "treamName");
			return this;
		}

		public Criteria andTreamNameLessThan(String value) {
			addCriterion("tream_name <", value, "treamName");
			return this;
		}

		public Criteria andTreamNameLessThanOrEqualTo(String value) {
			addCriterion("tream_name <=", value, "treamName");
			return this;
		}

		public Criteria andTreamNameLike(String value) {
			addCriterion("tream_name like", value, "treamName");
			return this;
		}

		public Criteria andTreamNameNotLike(String value) {
			addCriterion("tream_name not like", value, "treamName");
			return this;
		}

		public Criteria andTreamNameIn(List<String> values) {
			addCriterion("tream_name in", values, "treamName");
			return this;
		}

		public Criteria andTreamNameNotIn(List<String> values) {
			addCriterion("tream_name not in", values, "treamName");
			return this;
		}

		public Criteria andTreamNameBetween(String value1, String value2) {
			addCriterion("tream_name between", value1, value2, "treamName");
			return this;
		}

		public Criteria andTreamNameNotBetween(String value1, String value2) {
			addCriterion("tream_name not between", value1, value2, "treamName");
			return this;
		}

		public Criteria andTouristGroupProfitIdIsNull() {
			addCriterion("tourist_group_profit_id is null");
			return this;
		}

		public Criteria andTouristGroupProfitIdIsNotNull() {
			addCriterion("tourist_group_profit_id is not null");
			return this;
		}

		public Criteria andTouristGroupProfitIdEqualTo(Integer value) {
			addCriterion("tourist_group_profit_id =", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdNotEqualTo(Integer value) {
			addCriterion("tourist_group_profit_id <>", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdGreaterThan(Integer value) {
			addCriterion("tourist_group_profit_id >", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdGreaterThanOrEqualTo(
				Integer value) {
			addCriterion("tourist_group_profit_id >=", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdLessThan(Integer value) {
			addCriterion("tourist_group_profit_id <", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdLessThanOrEqualTo(Integer value) {
			addCriterion("tourist_group_profit_id <=", value,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdIn(List<Integer> values) {
			addCriterion("tourist_group_profit_id in", values,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdNotIn(List<Integer> values) {
			addCriterion("tourist_group_profit_id not in", values,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_profit_id between", value1, value2,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupProfitIdNotBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_profit_id not between", value1, value2,
					"touristGroupProfitId");
			return this;
		}

		public Criteria andTouristGroupRewardIdIsNull() {
			addCriterion("tourist_group_reward_id is null");
			return this;
		}

		public Criteria andTouristGroupRewardIdIsNotNull() {
			addCriterion("tourist_group_reward_id is not null");
			return this;
		}

		public Criteria andTouristGroupRewardIdEqualTo(Integer value) {
			addCriterion("tourist_group_reward_id =", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdNotEqualTo(Integer value) {
			addCriterion("tourist_group_reward_id <>", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdGreaterThan(Integer value) {
			addCriterion("tourist_group_reward_id >", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdGreaterThanOrEqualTo(
				Integer value) {
			addCriterion("tourist_group_reward_id >=", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdLessThan(Integer value) {
			addCriterion("tourist_group_reward_id <", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdLessThanOrEqualTo(Integer value) {
			addCriterion("tourist_group_reward_id <=", value,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdIn(List<Integer> values) {
			addCriterion("tourist_group_reward_id in", values,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdNotIn(List<Integer> values) {
			addCriterion("tourist_group_reward_id not in", values,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_reward_id between", value1, value2,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andTouristGroupRewardIdNotBetween(Integer value1,
				Integer value2) {
			addCriterion("tourist_group_reward_id not between", value1, value2,
					"touristGroupRewardId");
			return this;
		}

		public Criteria andGuideTypeEqualTo(Integer value) {
			addCriterion("guide_type =", value, "guideType");
			return this;
		}

		public Criteria andTgdEndDtIsNull() {
			addCriterion("tgd_end_dt is null");
			return this;
		}

		public Criteria andTgdEndDtIsNotNull() {
			addCriterion("tgd_end_dt is not null");
			return this;
		}

		public Criteria andTgdEndDtEqualTo(Date value) {
			addCriterion("tgd_end_dt =", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtNotEqualTo(Date value) {
			addCriterion("tgd_end_dt <>", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtGreaterThan(Date value) {
			addCriterion("tgd_end_dt >", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtGreaterThanOrEqualTo(Date value) {
			addCriterion("tgd_end_dt >=", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtLessThan(Date value) {
			addCriterion("tgd_end_dt <", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtLessThanOrEqualTo(Date value) {
			addCriterion("tgd_end_dt <=", value, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtIn(List<Date> values) {
			addCriterion("tgd_end_dt in", values, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtNotIn(List<Date> values) {
			addCriterion("tgd_end_dt not in", values, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtBetween(Date value1, Date value2) {
			addCriterion("tgd_end_dt between", value1, value2, "tgdEndDt");
			return this;
		}

		public Criteria andTgdEndDtNotBetween(Date value1, Date value2) {
			addCriterion("tgd_end_dt not between", value1, value2, "tgdEndDt");
			return this;
		}
	}
}
